<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>Class: IRTExam</title>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <meta http-equiv="Content-Script-Type" content="text/javascript" />
  <link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
  <script type="text/javascript">
  // <![CDATA[

  function popupCode( url ) {
    window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
  }

  function toggleCode( id ) {
    if ( document.getElementById )
      elem = document.getElementById( id );
    else if ( document.all )
      elem = eval( "document.all." + id );
    else
      return false;

    elemStyle = elem.style;
    
    if ( elemStyle.display != "block" ) {
      elemStyle.display = "block"
    } else {
      elemStyle.display = "none"
    }

    return true;
  }
  
  // Make codeblocks hidden by default
  document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
  
  // ]]>
  </script>

</head>
<body>



    <div id="classHeader">
        <table class="header-table">
        <tr class="top-aligned-row">
          <td><strong>Class</strong></td>
          <td class="class-name-in-header">IRTExam</td>
        </tr>
        <tr class="top-aligned-row">
            <td><strong>In:</strong></td>
            <td>
                <a href="../files/app/classes/irt/irt_exam_rb.html">
                app/classes/irt/irt_exam.rb
                </a>
        <br />
            </td>
        </tr>

        <tr class="top-aligned-row">
            <td><strong>Parent:</strong></td>
            <td>
                Object
            </td>
        </tr>
        </table>
    </div>
  <!-- banner header -->

  <div id="bodyContent">



  <div id="contextContent">
    <div id="diagram">
      <map id="map" name="map">
  <area shape="rect" coords="5,5,83,53"      href="IRTExam.html" alt="IRTExam" />
</map>
<img src="../dot/f_15.png" usemap="#map" border="0" alt="dot/f_15.png">
    </div>

    <div id="description">
      <ul>
<li>IRTRuby (<a
href="http://code.google.com/p/irtruby">code.google.com/p/irtruby</a>/)

</li>
<li>Copyright (C) 2010, KyoungMo Yang

</li>
<li><a href="IRTExam.html">IRTExam</a> is a class to handle data of test form
(e.g., test&#8216;s score, items, examinees, examinees&#8217; responses,
etc.).

</li>
<li>Author: KyoungMo Yang(E-mail : mo@embian.com)

</li>
<li>Modified: 2010-11-05

</li>
<li>References: N/A

</li>
</ul>

    </div>


   </div>

    <div id="method-list">
      <h3 class="section-bar">Methods</h3>

      <div class="name-list">
      <a href="#M000059">_init_question_no_of_items</a>&nbsp;&nbsp;
      <a href="#M000058">get_item_no</a>&nbsp;&nbsp;
      <a href="#M000055">new</a>&nbsp;&nbsp;
      <a href="#M000056">number_of_examinees</a>&nbsp;&nbsp;
      <a href="#M000057">number_of_items</a>&nbsp;&nbsp;
      </div>
    </div>

  </div>


    <!-- if includes -->

    <div id="section">


    <div id="constants-list">
      <h3 class="section-bar">Constants</h3>

      <div class="name-list">
        <table summary="Constants">
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">MISSING_RESPONSE</td>
          <td>=</td>
          <td class="context-item-value">-1</td>
          <td width="3em">&nbsp;</td>
          <td class="context-item-desc">
constants for examinees&#8217; missing response

</td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">CORRECT_RESPONSE</td>
          <td>=</td>
          <td class="context-item-value">1</td>
          <td width="3em">&nbsp;</td>
          <td class="context-item-desc">
constants for examinees&#8217; correct response

</td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">INCORRECT_RESPONSE</td>
          <td>=</td>
          <td class="context-item-value">0</td>
          <td width="3em">&nbsp;</td>
          <td class="context-item-desc">
constants for examinees&#8217; incorrect response

</td>
        </tr>
        </table>
      </div>
    </div>



    <div id="attribute-list">
      <h3 class="section-bar">Attributes</h3>

      <div class="name-list">
        <table>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">examinees</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">items</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">number_of_groups</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        </table>
      </div>
    </div>
      


    <!-- if method_list -->
    <div id="methods">
      <h3 class="section-bar">Public Class methods</h3>

      <div id="method-M000055" class="method-detail">
        <a name="M000055"></a>

        <div class="method-heading">
          <a href="#M000055" class="method-signature">
          <span class="method-name">new</span><span class="method-args">(new_examinees, new_items, new_number_of_groups = 1)</span>
          </a>
        </div>
      
        <div class="method-description">
          <ul>
<li>Functionailities

</li>
</ul>
<pre>
 * Constructs an instance of IRTTset class.
</pre>
<ul>
<li>Parameters

</li>
</ul>
<pre>
 * [new_examinees] : array of IRTExaminee
 * [new_items] : array of IRTItem
 * [new_number_of_groups] : the number of groups. default value is one.
</pre>
<ul>
<li>Return

</li>
</ul>
<pre>
 * An instance of IRTExam class
</pre>
<ul>
<li>Note

</li>
</ul>
<pre>
 * N/A
</pre>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000055-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000055-source">
<pre>
    <span class="ruby-comment cmt"># File app/classes/irt/irt_exam.rb, line 34</span>
34:   <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">new_examinees</span>, <span class="ruby-identifier">new_items</span>, <span class="ruby-identifier">new_number_of_groups</span> = <span class="ruby-value">1</span>)
35:     <span class="ruby-ivar">@examinees</span> = <span class="ruby-identifier">new_examinees</span>
36:     <span class="ruby-ivar">@items</span> = <span class="ruby-identifier">new_items</span>
37:     <span class="ruby-ivar">@number_of_groups</span> = <span class="ruby-identifier">new_number_of_groups</span>
38:     <span class="ruby-identifier">_init_question_no_of_items</span>
39:   <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <h3 class="section-bar">Public Instance methods</h3>

      <div id="method-M000058" class="method-detail">
        <a name="M000058"></a>

        <div class="method-heading">
          <a href="#M000058" class="method-signature">
          <span class="method-name">get_item_no</span><span class="method-args">(index)</span>
          </a>
        </div>
      
        <div class="method-description">
          <ul>
<li>Functionailities

</li>
</ul>
<pre>
 * return question number at given index
</pre>
<ul>
<li>Parameters

</li>
</ul>
<pre>
 * N/A
</pre>
<ul>
<li>Return

</li>
</ul>
<pre>
 * [no] : question number
</pre>
<ul>
<li>Note

</li>
</ul>
<pre>
 * N/A
</pre>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000058-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000058-source">
<pre>
    <span class="ruby-comment cmt"># File app/classes/irt/irt_exam.rb, line 73</span>
73:   <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_item_no</span>(<span class="ruby-identifier">index</span>)
74:     <span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@items</span>[<span class="ruby-identifier">index</span>].<span class="ruby-identifier">no</span>
75:   <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000056" class="method-detail">
        <a name="M000056"></a>

        <div class="method-heading">
          <a href="#M000056" class="method-signature">
          <span class="method-name">number_of_examinees</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <ul>
<li>Functionailities

</li>
</ul>
<pre>
 * return the number of examinees.
</pre>
<ul>
<li>Parameters

</li>
</ul>
<pre>
 * N/A
</pre>
<ul>
<li>Return

</li>
</ul>
<pre>
 * [result] : if true, using dichotmomous model otherwise, return false
</pre>
<ul>
<li>Note

</li>
</ul>
<pre>
 * N/A
</pre>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000056-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000056-source">
<pre>
    <span class="ruby-comment cmt"># File app/classes/irt/irt_exam.rb, line 49</span>
49:   <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">number_of_examinees</span>
50:     <span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@examinees</span>.<span class="ruby-identifier">size</span>
51:   <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000057" class="method-detail">
        <a name="M000057"></a>

        <div class="method-heading">
          <a href="#M000057" class="method-signature">
          <span class="method-name">number_of_items</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <ul>
<li>Functionailities

</li>
</ul>
<pre>
 * return the number of items.
</pre>
<ul>
<li>Parameters

</li>
</ul>
<pre>
 * N/A
</pre>
<ul>
<li>Return

</li>
</ul>
<pre>
 * [num_items] : the number of items.
</pre>
<ul>
<li>Note

</li>
</ul>
<pre>
 * N/A
</pre>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000057-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000057-source">
<pre>
    <span class="ruby-comment cmt"># File app/classes/irt/irt_exam.rb, line 61</span>
61:   <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">number_of_items</span>
62:     <span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@items</span>.<span class="ruby-identifier">size</span>
63:   <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <h3 class="section-bar">Private Instance methods</h3>

      <div id="method-M000059" class="method-detail">
        <a name="M000059"></a>

        <div class="method-heading">
          <a href="#M000059" class="method-signature">
          <span class="method-name">_init_question_no_of_items</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <ul>
<li>Functionailities

</li>
</ul>
<pre>
 * initialize question No. of items by array order
</pre>
<ul>
<li>Parameters

</li>
</ul>
<pre>
 * N/A
</pre>
<ul>
<li>Return

</li>
</ul>
<pre>
 * N/A
</pre>
<ul>
<li>Note

</li>
</ul>
<pre>
 * N/A
</pre>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000059-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000059-source">
<pre>
    <span class="ruby-comment cmt"># File app/classes/irt/irt_exam.rb, line 86</span>
86:   <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">_init_question_no_of_items</span>
87:     <span class="ruby-ivar">@items</span>.<span class="ruby-identifier">each_with_index</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">item</span>, <span class="ruby-identifier">i</span><span class="ruby-operator">|</span>
88:       <span class="ruby-identifier">item</span>.<span class="ruby-identifier">no</span> = <span class="ruby-identifier">i</span><span class="ruby-operator">+</span><span class="ruby-value">1</span>
89:     <span class="ruby-keyword kw">end</span>
90:   <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>


    </div>


  </div>


<div id="validator-badges">
  <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>

</body>
</html>